package cn.lovecyy.mockjson.core.type;

import cn.lovecyy.mockjson.core.domain.TypeConfig;

/**
 * ReferenceTypeMocker
 *
 * @author Yakir
 */
public class ReferenceTypeMocker implements TypeMocker {

	@Override
	public String getType() {
		return "ref";
	}

	@Override
	public Object mock(TypeConfig config) {
		String param = config.getParam();
		String mainParam = config.getMainParam();
		return config.getContext().get(mainParam);
	}

}
